package a;

import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Color;
import java.awt.Frame;
import java.awt.Panel;

class MyFrame4 extends Frame{
	Button btn1=new Button("BTN1");
	Button btn2=new Button("BTN2");
	Button btn3=new Button("BTN3");
	Button btn4=new Button("BTN4");
	Button btn5=new Button("BTN5");
	Panel pan1=new Panel();
	Panel pan2=new Panel();
	Panel pan3=new Panel();
	BorderLayout layout=new BorderLayout();
	public MyFrame4(){
		setLayout(layout);
		setSize(300,150);
		setVisible(true);
		
		pan1.setBackground(Color.RED);
		pan2.setBackground(Color.BLUE);
		pan3.setBackground(Color.PINK);
		
		pan1.add(btn1);
		pan1.add(btn2);
		pan2.add(btn3);
		pan3.add(btn4);
		pan3.add(btn5);
		
		add(pan1,BorderLayout.NORTH);
		add(pan2,BorderLayout.CENTER);
		add(pan3,BorderLayout.SOUTH);
	}
}
public class Test04 {
	public static void main(String[] args) {
		new MyFrame4();
	}
}















